#include "widget.h"
#include <QApplication>
#include <QDebug>
#include <dbpool.h>
#include "userservice.h"

int main(int argc, char *argv[])
{
    DBPool::init("localhost", 3306, "root", "root", "face", 5);

    QApplication a(argc, argv);

    Widget w;
    w.setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint);
    w.showFullScreen();

    UserService userService;
    userService.createTable();

    UserInfo user;
    user.id = "1";
    user.enabled = 1;
    user.createTime = "2012-10-01 10:22:33";
    user.endTime = "2024-02-03 00:22:34";
    user.gender = 1;
    user.idCard = "12343";
    user.image = "d:/2.jpg";
    user.name = "张三";
    user.startTime = "2021-01-20 08:10:30";
    userService.add(user);

    return a.exec();
}
